import request from '@/utils/request'
export function fetchNoticeList(params) {
  return request({
    url:'/admin/system/notice/list',
    method:'get',
    params:params
  })
}

export function updateNoticeInfo(uid,info) {
    return request({
      url:'/admin/system/notice/update/'+uid,
      method:'post',
      data:info
    })
}
export function newNoticeInfo(info) {
    return request({
      url:'/admin/system/notice/add',
      method:'post',
      data:info
    })
}
export function deleteNotice(uid) {
    return request({
      url:'/admin/system/notice/del/'+uid,
      method:'get'
    })
}
//获取未读消息列表
export function fetchMessageList(params) {
  return request({
    url:'/admin/system/withdraw/notice/list',
    method:'get',
    params:params
  })
}
//设置为已读
export function updateMessageInfo(mid) {
    return request({
      url:'/admin/system/withdraw/notice/read/'+mid,
      method:'get',
    })
}
//获取未读消息总数
export function getUnreadMsgSum() {
  return request({
    url:'admin/system/withdraw/notice/unread',
    method:'get',
  })
}

